
#ifndef _TIME_ALLOCATION_H_
#define _TIME_ALLOCATION_H_

#include <Eigen/Eigen>
#include <math.h>
using namespace std;
using namespace Eigen;

class TimeAllocation
{
private:
    MatrixXd m_time;
    MatrixXd m_path;
    double m_vel;
    double m_acc;
    int m_p_num1d;
public:
    TimeAllocation(MatrixXd Path,int d_order,double vel,double acc);
    ~TimeAllocation();

    void updateVel(double vel);
    void updateAcc(double acc);
    int getTimeSegs() const;
    double getTime(int i,int j) const;
    double operator()(int i,int j) const;
    void timeAllocation();
    void printTime();
};


#endif